package org.aurora.module.user.infra.dal.mysql.dataobject;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.*;
import org.aurora.framework.boot.data.common.dataobject.AuditDO;
import org.aurora.framework.boot.data.mybatis.audit.AuditInsertListener;
import org.aurora.framework.boot.data.mybatis.audit.AuditUpdateListener;

import java.io.Serial;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * name: UserDO
 * <p>
 * desc: 用户实体
 * </p>
 * create date: 2024-10-08 11:31:14
 *
 * @author cao.yong
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@Table(value = "sys_user", comment = "系统用户", onInsert = AuditInsertListener.class, onUpdate = AuditUpdateListener.class)
public class UserDO extends AuditDO<Long> {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;
    /**
     * 用户登录名
     */
    private String username;
    /**
     * 用户密码
     */
    private String password;
    /**
     * 用户状态
     */
    private Integer state;
    /**
     * 用户头像
     */
    private String avatar;
    /**
     * 用户昵称
     */
    private String nickName;
    /**
     * 真实姓名
     */
    private String realName;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 民族
     */
    private Integer ethnicity;
    /**
     * 国籍
     */
    private Integer nationality;
    /**
     * 身份证号
     */
    private String idCard;
    /**
     * 出生日期
     */
    private LocalDate birthDate;
    /**
     * 手机号码
     */
    private String telephone;
    /**
     * 用户邮箱
     */
    private String email;
    /**
     * 最后登录时间
     */
    private LocalDateTime lastLoginTime;
}
